/*
 * @(#)EmailFolderImpl.java
 *
 * Copyright (c) 2005 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */

package com.dcivision.mail.bean;

import javax.mail.FetchProfile;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.Store;

/**
  EmailFolderImpl.java

  This class is the serializable bean reflecting business logic uses.

    @author           Beyond Qu
    @company          DCIVision Limited
    @creation date    08/06/2005
    @version          $Revision: 1.2.26.1 $
*/
public class EmailFolderImpl implements EmailFolder  {
    
  private Folder folder ;
  
  public static int READ_ONLY = Folder.READ_ONLY ;
  public static int READ_WRITE = Folder.READ_WRITE ;
  
  public EmailFolderImpl(Folder folder){
    this.folder = folder;
    
  }
  
  public Message[] getMessages() throws Exception {   
    return this.folder.getMessages();
  }
  
  public void fetch(Message[] msg , FetchProfile profile) throws Exception {
    this.folder.fetch(msg,profile);
  }
  
  public void open(int arg) throws Exception {
    this.folder.open(arg);
  }
  
  public void close(boolean flag) throws Exception {
    this.folder.close(flag);
  } 
  
  public boolean isOpen() throws Exception {
    return this.folder.isOpen();  
  }
  
  public Store getStore() {
    return (this.folder.getStore());
  }

}
